<template>
	<view></view>
</template>
<script>
import {mapActions } from 'vuex';
import { toUrl } from '@/wlkutils/tools';
export default {
	data() {
		return {};
	},
    methods: {
        ...mapActions(['getUserInfo'])
    },
	async onLoad(options) {
		// #ifdef H5
		// 检测H5登录回调
		if (options?.token) {
			let that = this;
			uni.showLoading({
				title: '登录中...'
			});
			await that.getUserInfo(options.token);
            that.$u.toast('登录成功');
            var path = options.local?options.local:'/pages/index/index';
            toUrl(path);

		}
		// #endif
	},

};
</script>
